home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / src / GLperf3.12-src.lha / GLperf / ReadPix.h < prev    next >
Encoding:
C/C++ Source or Header  |  1996-08-01  |  5.5 KB  |  179 lines

  1. /*
  2.  * (c) Copyright 1995, Silicon Graphics, Inc.
  3.  * ALL RIGHTS RESERVED
  4.  * Permission to use, copy, modify, and distribute this software for
  5.  * any purpose and without fee is hereby granted, provided that the above
  6.  * copyright notice appear in all copies and that both the copyright notice
  7.  * and this permission notice appear in supporting documentation, and that
  8.  * the name of Silicon Graphics, Inc. not be used in advertising
  9.  * or publicity pertaining to distribution of the software without specific,
  10.  * written prior permission.
  11.  *
  12.  * THE MATERIAL EMBODIED ON THIS SOFTWARE IS PROVIDED TO YOU "AS-IS"
  13.  * AND WITHOUT WARRANTY OF ANY KIND, EXPRESS, IMPLIED OR OTHERWISE,
  14.  * INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY OR
  15.  * FITNESS FOR A PARTICULAR PURPOSE.  IN NO EVENT SHALL SILICON
  16.  * GRAPHICS, INC.  BE LIABLE TO YOU OR ANYONE ELSE FOR ANY DIRECT,
  17.  * SPECIAL, INCIDENTAL, INDIRECT OR CONSEQUENTIAL DAMAGES OF ANY
  18.  * KIND, OR ANY DAMAGES WHATSOEVER, INCLUDING WITHOUT LIMITATION,
  19.  * LOSS OF PROFIT, LOSS OF USE, SAVINGS OR REVENUE, OR THE CLAIMS OF
  20.  * THIRD PARTIES, WHETHER OR NOT SILICON GRAPHICS, INC.  HAS BEEN
  21.  * ADVISED OF THE POSSIBILITY OF SUCH LOSS, HOWEVER CAUSED AND ON
  22.  * ANY THEORY OF LIABILITY, ARISING OUT OF OR IN CONNECTION WITH THE
  23.  * POSSESSION, USE OR PERFORMANCE OF THIS SOFTWARE.
  24.  *
  25.  * US Government Users Restricted Rights
  26.  * Use, duplication, or disclosure by the Government is subject to
  27.  * restrictions set forth in FAR 52.227.19(c)(2) or subparagraph
  28.  * (c)(1)(ii) of the Rights in Technical Data and Computer Software
  29.  * clause at DFARS 252.227-7013 and/or in similar or successor
  30.  * clauses in the FAR or the DOD or NASA FAR Supplement.
  31.  * Unpublished-- rights reserved under the copyright laws of the
  32.  * United States.  Contractor/manufacturer is Silicon Graphics,
  33.  * Inc., 2011 N.  Shoreline Blvd., Mountain View, CA 94039-7311.
  34.  *
  35.  * Author: John Spitzer, SGI Applied Engineering
  36.  *
  37.  */
  38.  
  39. #if (defined(INC_REASON)) && (INC_REASON == INFO_ITEM_STRUCT)
  40. #include "Test.h"
  41.     int readPixelsWidth;
  42.     int readPixelsHeight;
  43.     int readBuffer;
  44.     int readOrder;
  45.     /* Variables below this line aren't user settable */
  46.     void **imageData;
  47.     int numDrawn;
  48.     int subImage;
  49.     GLint *srcData;
  50.     GLint *subImageData;
  51.     /* Member functions */
  52.     /* void Initialize(TestPtr); */               /* virtual function */
  53.     /* void Execute(TestPtr);   */                /* virtual function */
  54.     /* int SetState(TestPtr);  */                 /* virtual function */
  55.     /* float PixelSize(TestPtr);  */              /* virtual function */
  56.     /* int TimesRun(TestPtr);  */               /* virtual function */
  57.     /* void (*SetExecuteFunc)(TestPtr); */        /* virtual function */
  58.     Image image_ReadPixels;
  59.     TransferMap transfermap_ReadPixels;
  60. #elif (defined(INC_REASON)) && (INC_REASON == INFO_ITEM_ARRAY)
  61. #include "Test.h"
  62. #undef offset
  63. #define offset(v) offsetof(ReadPixels,transfermap_ReadPixels)+offsetof(TransferMap, v)
  64. #include "TransMap.h"
  65. #undef offset
  66. #define offset(v) offsetof(ReadPixels, image_ReadPixels)+offsetof(Image, v)
  67. #include "Image.h"
  68. #undef offset
  69. #define offset(v) offsetof(ReadPixels,v)
  70.     {
  71.         ReadPixelsWidth,
  72.         "Width of ReadPixels",
  73.         offset(readPixelsWidth),
  74.         RangedInteger,
  75.         {
  76.             { 1 },
  77.             { 2048 },
  78.         },
  79.         { -1 }
  80.     },
  81.     {
  82.         ReadPixelsHeight,
  83.         "Height of ReadPixels",
  84.         offset(readPixelsHeight),
  85.         RangedInteger,
  86.         {
  87.             { 1 },
  88.             { 2048 },
  89.         },
  90.         { -1 }
  91.     },
  92.     {
  93.         ReadBuffer,
  94.         "Read Buffer",
  95.         offset(readBuffer),
  96.         Enumerated,
  97.         {
  98.             { GL_FRONT_LEFT,    "GL_FRONT_LEFT" },
  99.             { GL_FRONT_RIGHT,    "GL_FRONT_RIGHT" },
  100.             { GL_BACK_LEFT,    "GL_BACK_LEFT" },
  101.             { GL_BACK_RIGHT,    "GL_BACK_RIGHT" },
  102.             { GL_FRONT,        "GL_FRONT" },
  103.             { GL_BACK,        "GL_BACK" },
  104.             { GL_LEFT,        "GL_LEFT" },
  105.             { GL_RIGHT,        "GL_RIGHT" },
  106. #ifdef GL_AUX0
  107.             { GL_AUX0,      "GL_AUX0" },
  108. #endif
  109. #ifdef GL_AUX1
  110.             { GL_AUX1,      "GL_AUX1" },
  111. #endif
  112. #ifdef GL_AUX2
  113.             { GL_AUX2,      "GL_AUX2" },
  114. #endif
  115. #ifdef GL_AUX3
  116.             { GL_AUX3,      "GL_AUX3" },
  117. #endif
  118.             { End }
  119.         },
  120.         { GL_FRONT }
  121.     },
  122.     {
  123.         ReadOrder,
  124.         "Order in which Images/Bitmaps/Text are Read",
  125.         offset(readOrder),
  126.         Enumerated,
  127.         {
  128.             { Serial,            "Serial" },
  129.             { Spaced,            "Spaced" },
  130.             { End }
  131.         },
  132.         { Spaced }
  133.     },
  134.     {
  135.         0
  136.     }
  137.  
  138. #else  /* INC_REASON not defined, treat as plain include */
  139. #ifndef _ReadPix_h
  140. #define _ReadPix_h
  141.  
  142. #include "Test.h"
  143. #include "Image.h"
  144. #include "TransMap.h"
  145. #include "Zoom.h"
  146. #include "General.h"
  147. #include "TestName.h"
  148. #include "PropName.h"
  149. #include "Global.h"
  150. #include "AttrName.h"
  151. #ifdef WIN32
  152. #include <windows.h>
  153. #endif
  154. #include <GL/gl.h>
  155. #include <GL/glu.h>
  156. #include "Random.h"
  157. #include "FuncEnum.h"
  158.  
  159. typedef struct _ReadPixels {
  160. #define INC_REASON INFO_ITEM_STRUCT
  161. #include "ReadPix.h"
  162. #undef INC_REASON
  163. } ReadPixels, *ReadPixelsPtr;
  164.  
  165. ReadPixelsPtr new_ReadPixels();
  166. void delete_ReadPixels(TestPtr);
  167. void ReadPixels__AddTraversalData(ReadPixelsPtr);
  168. int ReadPixels__SetState(TestPtr);
  169. void ReadPixels__Initialize(TestPtr);
  170. void ReadPixels__Cleanup(TestPtr);
  171. void ReadPixels__SetExecuteFunc(TestPtr);
  172. TestPtr ReadPixels__Copy(TestPtr);
  173. float ReadPixels__Size(TestPtr);
  174. int ReadPixels__TimesRun(TestPtr);
  175. void ReadPixels__CreateImageData(ReadPixelsPtr);
  176.  
  177. #endif /* file not already included */
  178. #endif /* INC_REASON not defined */
  179.